/*
 * Copyright 2011 Niklas Kyster Rasmussen
 * 
 * This file is part of WotXP.
 *
 * WotXP is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * WotXP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with WotXP; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 */

package net.nikr.wot.core;

import java.util.Arrays;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class Main {
	
	private final static Logger LOG = LoggerFactory.getLogger(Main.class);
	
	public static final String PROGRAM_NAME = "WotXP";
	public static final String PROGRAM_VERSION = "1.0.0";

	public Main() {}
	
	public static void main(String[] args) {
		LOG.info("Welcome to "+PROGRAM_NAME+" "+PROGRAM_VERSION);
		List<String> arguments = Arrays.asList(args);
		boolean cmd = ((System.console() != null || arguments.contains("-cmd")) && !arguments.contains("-gui"));
		ExceptionHandler.install("Please email the wotxp.log to niklaskr@gmail.com with reproduction sted...", !cmd);
		if (cmd){
			CmdProgram cmdProgram = new CmdProgram();
		} else {
			GuiProgram guiProgram = new GuiProgram();
		}
	}
}
